<template>
  <div>
    <myheader title="我的收藏">
      <span
        slot="left"
        class="iconfont iconjiantou2"
        @click="$router.back()"
      ></span>
    </myheader>
    <articleBlock
      v-for="(value,index) in starlist"
      :key="index"
      :post='value'
      @click="handlerClick"
    ></articleBlock>
  </div>
</template>

<script>
import { user_starlist } from "@/apis/user.js";
import myheader from "@/components/myheader.vue";
import articleBlock from "@/components/articleBlock.vue";
export default {
  data() {
    return {
      starlist: [],
    };
  },
  components: {
    myheader,
    articleBlock,
  },
  methods: {
    handlerClick(id) {
      this.$router.push({ path: `/articleDetail/${id}` });
    },
  },
  async mounted() {
    let res = await user_starlist();
    console.log(res);
    this.starlist = res.data.data;
  },
};
</script>

<style>
</style>